package com.dd.cloud.user.entity.doctor;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author xt
 */
@Data
@EqualsAndHashCode
@Accessors(chain = true)
@Table(comment = "医生积分表")
public class DoctorIntegral implements Serializable {


    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Column(isKey = true, isAutoIncrement = true)
    private Integer id;


    /**
     * 积分标题
     */
    @Column(comment = "积分标题", length = 32)
    private String title;

    /**
     * 积分类型
     */
    @Column(comment = "积分类型", length = 4)
    private Integer type;

    /**
     * 积分数量
     */
    @Column(comment = "积分数量")
    private Integer num;

    /**
     * 积分状态
     */
    @Column(comment = "状态 -2.退回,0.待领取,1.未领取(失效),2.已领取,3.已使用", length = 4)
    private Integer status;

    /**
     * 医生id
     */
    @Column(comment = "医生id", length = 4)
    private Integer doctorId;

    /**
     * 订单号
     */
    @Column(comment = "订单号", length = 128)
    private String orderNo;

    /**
     * 处方号
     */
    @Column(comment = "处方号", length = 128)
    private String tencode;

    /**
     * 结束时间
     */
    @Column(comment = "领取结束时间")
    private LocalDateTime endDate;

    /**
     * 创建时间
     */
    @Column(comment = "创建时间")
    private LocalDateTime createDate;

    /**
     * 领取时间
     */
    @Column(comment = "领取时间")
    private LocalDateTime giveDate;

    /**
     * 后端自用
     */
    @TableField(exist = false)
    private String time;

    /**
     * 商品兑换订单号
     */
    @Column(comment = "商品兑换号", length = 128)
    private String exchangeNo;

    /**
     * 帖子id
     */
    @Column(comment = "帖子id记录")
    private Integer postId;
}
